//
//  SCDBManager.h
//  SCFoundationKit
//
//  Created by Chao Sheng on 2023/10/24.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface SCDBManager : NSObject

+ (instancetype)share;

/// 创建表
/// tableName表名
/// 字段名（NSDictionary）{"字段名称":"字段属性"},比如{"stuName":"TEXT"}
- (void)createTableWithTableName:(NSString*)tableName
                    columnParams:(NSDictionary*)columnParams;
/// 增
/// tableName表名
/// 字段名（NSDictionary）{"字段名称":"插入数据"}
- (void)insertTableWithTableName:(NSString*)tableName
                    columnParams:(NSDictionary*)columnParams;

///删 where fieldName = fieldValue
- (void)deleteTableWithTableName:(NSString*)tableName
                      columnName:(NSString *)columnName
                     columnValue:(id)columnVaule;


///改 set {setField[key]} = {setField[value]} where {WhereField[key]} = {WhereField[value]}
- (void)updateTableWithTableName:(NSString*)tableName
                       setColumn:(NSDictionary*)setColumn
                     whereColumn:(NSDictionary*)whereColumn;

///查
- (NSDictionary *)queryAllWithTableName:(NSString*)tableName
                             columnName:(NSString *)columnName
                            columnValue:(id)columnVaule;
@end

NS_ASSUME_NONNULL_END
